package org.bbelovic.devel.exercises.jgac.chapter01;

import java.util.ArrayList;
import java.util.List;

public class Chapter01 {

    public <T> List<T> toList(final T[] arr) {
        final List<T> result = new ArrayList<T>();
        for (T eachElement: arr) {
            result.add(eachElement);
        }
        return result;
    }

    public <T> List<T> toList1(final T... args) {
        final List<T> result = new ArrayList<T>();
        Number n = new Integer(1);
        Integer x = (Integer) n;
        for (final T elem: args) {
            result.add(elem);
        }
        return result;
    }

}
